/* Example Apply */
/* Functions and vectors can be arguments or components.
   Enum can be used to provide labels for records */

apply(pair)
{
 return pair[function](pair[argument]);
}

f(x)               // f takes functions as arguments
{ return x(0); }  

g(x)
{ return (100+x); }

main()
{
 enum { function, argument };
 x = vector { f; g; };  // a vector of functions
 print(apply(x),"\n");
}
